/*
 * Copyright (c) 2020, 2023, 3044483124@qq.com All rights reserved.
 *
 */
package itcast;

/**
 * <p>Project: JavaStudy - FormatString
 * <p>Powered by jiangbo On 2023-01-31
 * 21:53:23
 * <p>Created by IntelliJ IDEA
 *
 * @author jiangbo [3044483124@qq.com]
 * @version 1.0
 * @since 8/17
 */
public class FormatString {
    public static void main(String[] args) {
        int id = 3;
        String name = "李四";
        int age = 18;
        String address = "河南省郑州市";
        System.out.printf("编号：%03d，姓名：%s，年龄：%d岁，家庭地址：%s。", id,
                name, age, address);
//格式化字符串 左对齐 右对齐 大写显示 小写显示
        System.out.printf("%n");
        System.out.printf("%-10s%-6d%n","张三",18);
        System.out.printf("%-10s%-6d%n","张三丰",9);
        System.out.printf("%S %<s%n","helloworld");
    }
}


